package edu.ynu.se.xiecheng.achitectureclass.dao;


import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;
import edu.ynu.se.xiecheng.achitectureclass.entity.SoilMoistureData;
import edu.ynu.se.xiecheng.achitectureclass.entity.SoilNitrogenData;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface SoilMoistureDataDao extends LogicDAO<SoilMoistureData, Long> {
    List<SoilMoistureData> findAll();
    SoilMoistureData findTopByOrderByCreateTimeDesc();

    // 获取土壤温度历史数据（分页）
    Page<SoilMoistureData> findAllByOrderByCreateTimeDesc(Pageable pageable);
}
